package utils;

import objects.AIPlayer;
import objects.Character;
import objects.HumanPlayer;
import objects.Player;

public class PlayerFactory 
{
	/**
	 * Characters Enum generator from strings.
	 */
	public static Player createPlayer(int playerId, String playerName, Character playerCharacter, String CharType, int nPlayerOrder) 
	{
		Player plNew = null;
		switch (CharType.toLowerCase())
        {
            case("computer"):
            {
            	plNew = new AIPlayer(playerId, playerName, playerCharacter, nPlayerOrder);
            	break;
            }
            case("human"):
            {
            	plNew = new HumanPlayer(playerId, playerName, playerCharacter, nPlayerOrder);
            	break;
            }
        }
		return plNew;
	}
}
